<template>
  <div>about</div>
  <h1>{{ $route.query.userInfo }}</h1>
</template>

<script setup lang="ts">
const $route = useRoute();

/* definePageMeta({
  middleware: "auth",
}); */

// 匿名路由中间件
definePageMeta({
  middleware: defineNuxtRouteMiddleware(() => {
    let user = false;
    if (!user) {
      return navigateTo("/login");
    }
  }),
});
</script>

<style lang="less" scoped></style>
